<?php
/**
 * 用户中心控制器
 * @author e5
 *
 */
class MemberController extends CommonController{
	private $db;
	public function __init(){
		parent::__init();
		$this->checkLogin();
		$this->db = K("User");
	}
	public function index() {
		//获得全部分类
		$cateData = K("Category")->all();
		//获得顶级分类
		$topCate = array();
		foreach ($cateData as $v){
			if ($v['pid'] == 0){
				$topCate[] = $v;
			}
		}
		$this->assign("topCate",$topCate);
		$this->assign("cateData",$cateData);
		$this->dis('member');
	}
}